<?php
/*
        Model class for announcements. Has CRUD functionalities
*/
class M_announcements extends CI_Model{

/*==========================SELECT QUERIES==============================*/
        /*
                Gets all announcements
        */
        public function get_all_announcements(){
                $query = 'SELECT 
                                        caption
                                        announcement_date
                                        announcement
                                        posted_by
                                        created_at
                                        updated_at
                                FROM
                                        announcements';
                $q = $this->db->query($query);
                return $q->num_rows() >= 1 ? $q->result() : FALSE; //returns result if none retrieved, returns FALSE
        }
/*==========================END OF SELECT QUERIES==============================*/




/*==========================UPDATE QUERIES==============================*/

}

?>